/**
 * @projectName demo-master
 * @fileName DemoController.java
 * @packageName org.example.consumer.controller
 * @author xaoyaoyao
 * @date 2021/3/30 16:27
 * @version V1.0
 * @copyright (c) 2021, xaoyaoyao@aliyun.com All Rights Reserved.
 */
package org.example.consumer.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.example.api.DemoService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xaoyaoyao
 * @className DemoController
 * @description
 * @date 2021/3/30 16:27
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

	@DubboReference
	private DemoService demoService;

	@RequestMapping("/hello/{id}")
	public String hello(@PathVariable("id") String id) {
		return demoService.hello(id);
	}
}
